function [M] = FindMinima(A)

L = length(A);
M(1) = 0;
for i = 2:L-1
    if (A(i-1)>A(i) && A(i)<A(i+1))
        M(i) = 1;
    else
        M(i) = 0;
    end
end
M(L) = 0;
